package org.jeecgframework.web.system.pojo.base;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


/**
 * 部门机构表
 * @author  张云龙
 */
@Entity
@Table(name = "t_s_depart_his", schema = "")
public class TSDepartHis implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;
	private String id;
	private TSDepart TSPDepart;//上级部门 // NOPMD by dzqThinkpad on 16-4-1 下午4:23
	private String departname;//部门名称
	private String description;//部门描述
    private String orgCode;//机构编码
    private String orgType;//机构编码
    private String shortname;//简称
    private String address;//地址
    private String phone;//联系电话
    private String faxCode;//传真
    private String bpCode;//BP号
    private String busScope;//业务范围
    private Boolean logicDelete; //删除状态
    private String webSite;//
	/*private List<TSDepart> TSDeparts = new ArrayList<TSDepart>();*/
	private java.lang.String dataStatus;

	@Id
	@Column(name ="ID",nullable=false,length=32)
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "parentdepartid")
	public TSDepart getTSPDepart() {
		return this.TSPDepart;
	}

	public void setTSPDepart(TSDepart TSPDepart) { // NOPMD by dzqThinkpad on 16-4-1 下午4:23
		this.TSPDepart = TSPDepart;
	}

	@Column(name = "departname", nullable = false, length = 100)
	public String getDepartname() {
		return this.departname;
	}

	public void setDepartname(String departname) {
		this.departname = departname;
	}

	@Column(name = "description", length = 500)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	/*@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TSPDepart")
	public List<TSDepart> getTSDeparts() {
		return TSDeparts;
	}

	public void setTSDeparts(List<TSDepart> tSDeparts) {
		TSDeparts = tSDeparts;
	}*/

    @Column(name = "org_code", length = 64)
    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    @Column(name = "org_type", length = 20)
    public String getOrgType() {
        return orgType;
    }

    public void setOrgType(String orgType) {
        this.orgType = orgType;
    }

    @Column(name = "shortname", length = 40)
	public String getShortname() {
		return shortname;
	}

	public void setShortname(String shortname) {
		this.shortname = shortname;
	}

    @Column(name = "address", length = 80)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

    @Column(name = "phone", length = 30)
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

    @Column(name = "fax_code", length = 30)
	public String getFaxCode() {
		return faxCode;
	}

	public void setFaxCode(String faxCode) {
		this.faxCode = faxCode;
	}

    @Column(name = "bp_code", length = 30)
	public String getBpCode() {
		return bpCode;
	}

	public void setBpCode(String bpCode) {
		this.bpCode = bpCode;
	}

	@Column(name = "bus_scope", length = 200)
	public String getBusScope() {
		return busScope;
	}

	public void setBusScope(String busScope) {
		this.busScope = busScope;
	}

	@Column(name = "logic_delete", nullable=true,length=1)
	public Boolean getLogicDelete() {
		return logicDelete;
	}

	public void setLogicDelete(Boolean logicDelete) {
		this.logicDelete = logicDelete;
	}

	@Column(name = "web_site", length=150)
	public String getWebSite() {
		return webSite;
	}

	public void setWebSite(String webSite) {
		this.webSite = webSite;
	}
	
	/**
	 *方法: 取得java.lang.String
	 *@return: java.lang.String  数据状态
	 */
	@Column(name ="DATA_STATUS",nullable=true,length=10)
	public java.lang.String getDataStatus() {
		return dataStatus;
	}

	/**
	 *方法: 设置java.lang.String
	 *@param: java.lang.String  数据状态
	 */
	public void setDataStatus(java.lang.String dataStatus) {
		this.dataStatus = dataStatus;
	}
}